import 'package:flustars/flustars.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBEngineer/YBBaseRouter/YBApplication.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBEngineer/YBBaseRouter/YBNavigator.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';

class YBZuZhiGuanLiQuanXianPage{

  static void showZuZhiGuanLiQuanXian(BuildContext context){
      showDialog(context:context, builder:(BuildContext context){
       return Dialog(
         shape: RoundedRectangleBorder(
           borderRadius: BorderRadius.all(Radius.circular(ScreenUtil.getInstance().getAdapterSize(16.0))),
         ),
         child: Container(
           height: ScreenUtil.getInstance().getAdapterSize(250.0),
           child: Column(
             children: [
               Container(
                 child: Padding(
                   padding: EdgeInsets.only(left: ScreenUtil.getInstance().getAdapterSize(20.0),top:ScreenUtil.getInstance().getAdapterSize(24.0),right: ScreenUtil.getInstance().getAdapterSize(20.0)),
                   child: Container(
                     child: Row(
                       children: [
                         Container(
                           child: Image.asset(YBImageStyle.getImagePath('popTanView_biaoqingInfo'),width:ScreenUtil.getInstance().getAdapterSize(40.0),height: ScreenUtil.getInstance().getAdapterSize(40.0),),
                         ),
                         Container(
                           width:  ScreenUtil.getInstance().getAdapterSize(15.0),
                         ),
                         Container(
                           child: Text('很抱歉，您的权限不足',style: TextStyle(
                              color: YBColor.color181818,
                              fontSize: ScreenUtil.getInstance().getAdapterSize(20.0),
                              fontWeight: FontWeight.w500,
                           ),),
                         ),
                       ],
                     ),
                   ),
                 ),
               ),
               Expanded(
                 // color: YBColor.white,
                 child: Padding(
                   padding: EdgeInsets.fromLTRB(10, 20, 0, 20),
                   child: Container(
                     child: Column(
                       mainAxisAlignment: MainAxisAlignment.start,
                       crossAxisAlignment: CrossAxisAlignment.start,
                       children: [
                         Container(
                           child: Text(
                             "您可能:",
                             style: TextStyle(
                               color: YBColor.color303133,
                               fontSize: ScreenUtil.getInstance().getAdapterSize(16.0),
                               fontWeight: FontWeight.w500,
                             ),
                           ),
                         ),
                         Container(
                           height: 8,
                         ),
                         Container(
                           child:Column(
                             mainAxisAlignment: MainAxisAlignment.start,
                             crossAxisAlignment: CrossAxisAlignment.start,
                             children: [
                               Container(
                                 child: Text('1、还没有加入原始公会',style: TextStyle(
                                   color: YBColor.color303133,
                                   fontSize: ScreenUtil.getInstance().getAdapterSize(12.0),
                                   fontWeight: FontWeight.normal,
                                 ),),
                               ),
                               Container(
                                 height: 8,
                               ),
                               Container(
                                 child: Text('2、已拥有公会卡，但未激活',style: TextStyle(
                                   color: YBColor.color303133,
                                   fontSize: ScreenUtil.getInstance().getAdapterSize(12.0),
                                   fontWeight: FontWeight.normal,
                                 ),),
                               ),
                             ],
                           ),
                         ),
                       ],
                     ),
                   ),
                 ),
               ),
               Container(
                 child: Row(
                   children: [
                     Expanded(
                       flex: 1,
                       child: Container(
                         height: ScreenUtil.getInstance().getAdapterSize(56.0),
                         child: RawMaterialButton(
                             shape: RoundedRectangleBorder(
                               borderRadius: BorderRadius.only(bottomLeft: Radius.circular(16.0)),
                             ),
                             child: Text('加入公会'),
                             onPressed:() async {
                               YBNavigatorUtil.goDefaultBack(context);
                               YBApplication.router.navigateTo(context, '/mine/mineYuanShiGongHuiPage');
                             }),
                       ),
                     ),
                     Expanded(
                       flex: 1,
                       child:Container(
                         height: YBTextStyle.adapterSize56,
                         child: FlatButton(
                             shape: RoundedRectangleBorder(
                               borderRadius: BorderRadius.only(bottomRight: Radius.circular(YBTextStyle.adapterSize16)),
                             ),
                             color: YBColor.commonThemeColor,
                             child: Text('立即激活',style: YBTextStyle.TextStyleFFFFFF14Sembold,),
                             onPressed:() async {
                               YBNavigatorUtil.goDefaultBack(context);
                               YBNavigatorUtil.jump(context, '/mine/mineZhuZhiManagerPage/mineJiHuoGongHuiKaManagerPage');
                             }),
                       ),
                     ),
                   ],
                 ),
               ),
             ],
           ),
         ),
       );
    });
  }

  static void showQiYeAndPersonalLiApi(BuildContext context){
    showDialog(context:context, builder:(BuildContext context){
      return Dialog(
        child: Container(
          height: 210,
          child: Padding(
            padding: EdgeInsets.zero,
            child: Column(
              children: [
                Container(
                  // color: YBColor.white,
                  child: Padding(
                    padding: EdgeInsets.only(left: 20,right: 20,top: 15),
                    child: Row(
                      children: [
                        Container(
                          child: Image.asset(YBImageStyle.getImagePath('popTanView_biaoqingInfo'),width: 40,height: 40,),
                        ),
                        Container(
                          width: 15,
                        ),
                        Container(
                          child: Text('您好，重新认证',style: YBTextStyle.TextStyle18181816Medium,),
                        ),
                      ],
                    ),
                  ),
                ),
                Expanded(
                  // color: YBColor.white,
                  child: Padding(
                    padding: EdgeInsets.fromLTRB(20, 20, 20, 10),
                    child: Container(
                      child: Column(
                        mainAxisAlignment: MainAxisAlignment.start,
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Container(
                            height: 8,
                          ),
                          Container(
                            child:Column(
                              mainAxisAlignment: MainAxisAlignment.start,
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Container(
                                  child: Text('重新认证会将认证状态转为为认证，部分认证功能将无法使用，待审核通过后恢复正常，是否继续？',style: YBTextStyle.TextStyle18181811,),
                                ),
                              ],
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                ),
                Container(
                  child: Row(
                    children: [
                      Expanded(
                        flex: 1,
                        child: RawMaterialButton(
                            child: Text('取消'),
                            onPressed:() async {
                              YBNavigatorUtil.goDefaultBack(context);
                            }),
                      ),
                      Expanded(
                        flex: 1,
                        child:Container(
                          height: 50,
                          child: RawMaterialButton(
                              fillColor: YBColor.commonThemeColor,
                              child: Text('继续',style: YBTextStyle.TextStyleFFFFFF14Sembold,),
                              onPressed:() async {
                                YBNavigatorUtil.goDefaultBack(context);
                                YBApplication.router.navigateTo(context, '/mine/mineQiYePersonPage');
                              }),
                        ),
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ),
        ),
      );
    });
  }

  static void showWenZhangShengChengQI(BuildContext context){
    showDialog(
      context:context,builder:(BuildContext context){
        return Dialog(
          child: Container(
            height: 150,
            child: Padding(
              padding:EdgeInsets.only(left: 20,right: 20,top: 15),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.start,
                crossAxisAlignment: CrossAxisAlignment.stretch,
                children: [
                  Container(
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Container(
                           height: 2,
                           width: 2,
                        ),
                        Container(
                          child: Text('录入文章',style: YBTextStyle.TextStyle18181814Medium,),
                        ),
                        Container(
                          child: InkWell(
                            child: Image.asset(YBImageStyle.getImagePath('icon_share_close')),
                            onTap: () async {
                              YBNavigatorUtil.goDefaultBack(context);
                            },
                          ),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    height: 20,
                  ),
                  Container(
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceAround,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Container(
                          child: InkWell(
                            child: Column(
                              children: [
                                Container(
                                  child: Image.asset(YBImageStyle.getImagePath('xieyuanchuan_imageView'),width: 40,height: 40,),
                                ),
                                Container(
                                  height: 8,
                                ),
                                Container(
                                  child: Text('写原创文章',style: YBTextStyle.TextStyle30313312,),
                                ),
                              ],
                            ),
                            onTap: () async{
                              YBNavigatorUtil.goDefaultBack(context);
                               YBApplication.router.navigateTo(context, '/workTaiPage/findYuanchuangWenZhangYePage');

                            },
                          ),
                        ),
                        Container(
                          child: InkWell(
                            child: Column(
                              children: [
                                Container(
                                  child: Image.asset(YBImageStyle.getImagePath('xieyuanhcuang_wechat'),width: 40,height: 40,),
                                ),
                                Container(
                                  height: 8,
                                ),
                                Container(
                                  child: Text('微信公众号转载',style: YBTextStyle.TextStyle30313312),
                                ),
                              ],
                            ),
                            onTap: () async {
                              YBNavigatorUtil.goDefaultBack(context);
                              YBApplication.router.navigateTo(context, '/workTaiPage/workTaizhuanzaiWechatWenZhangPage');
                            },
                          ),
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            ),
          ),
        );
    });
  }

}